<template>
	<view class="page">
		<MyTabs :tabs="tabs" v-model:currentTab="currentTab" />
		<view class="box_top">
			<view class="image-container">
				<image class="uimages" :src="imageUrl1" mode="" />
			</view>

			<view style="padding: 0 250rpx;box-sizing: border-box; margin:40rpx  0;">
				<image style="height: 46rpx; width: 248rpx; margin: 0 auto;" :src="imageUrl2" mode="" />
			</view>
		</view>

		<view v-if="currentTab === 0">
			<MaintenanceReq style="margin-top: 20rpx;" v-for="(question, index) in questions" :key="index"
				:questionData="question">
			</MaintenanceReq>
		</view>
		<view v-if="currentTab === 1">
			<MaintenanceReq style="margin-top: 20rpx;" v-for="(systemConfig, index) in systemConfigs" :key="index"
				:questionData="systemConfig">
			</MaintenanceReq>
		</view>
		<view v-if="currentTab === 2">
			<MaintenanceReq style="margin-top: 20rpx;" v-for="(permissionIssue, index) in permissionIssues" :key="index"
				:questionData="permissionIssue">
			</MaintenanceReq>
		</view>

	</view>
</template>

<script>
	import MyTabs from '../../components/Mymaintenance/My_maintenance.vue';
	import MaintenanceReq from '../../components/Maintenance_Requirements.vue';


	export default {
		components: {
			MyTabs,
			MaintenanceReq
			// uptodate,
			// resolved,
			// Unresolved,
			// Selectionbox
		},
		data() {
			return {
				currentTab: 0,
				imageUrl1: 'http://openapi.keyboardadmin.com:9001/KingdeeCommunity/banner@tw.png',
				imageUrl2: 'http://openapi.keyboardadmin.com:9001/KingdeeCommunity/title3@2x.png',
				tabs: [{
						name: '未处理'
					},
					{
						name: '处理中'
					},
					{
						name: '已解决'
					}
				],
				questions: [{
						"title": "金蝶安装时提示组件传送错误，拒绝访问 需要怎么解决？",
						"answerer": "谢霆锋",
						"questionTime": "2024-05-20 12:37",
						"messageCount": 3,
						"name": "王大锤",
						"department": "网络部",
						"companyName": "东阳市裕宬礼品有限公司"
					},
					{
						"title": "金蝶使用过程中频繁出现卡顿现象，如何优化？",
						"answerer": "周杰伦",
						"questionTime": "2024-06-15 14:20",
						"messageCount": 5,
						"name": "李小萌",
						"department": "技术部",
						"companyName": "杭州市创新科技有限公司"
					},
					// 可以添加更多的问题数据对象
				],
				systemConfigs: [{
						"title": "金蝶系统如何配置网络代理？",
						"answerer": "林俊杰",
						"questionTime": "2024-07-10 15:45",
						"messageCount": 2,
						"name": "张小明",
						"department": "运维部",
						"companyName": "上海市卓越科技有限公司"
					},
					{
						"title": "金蝶软件的数据库配置参数如何修改？",
						"answerer": "蔡依林",
						"questionTime": "2024-08-05 11:30",
						"messageCount": 4,
						"name": "李小花",
						"department": "技术部",
						"companyName": "广州市蓝天贸易有限公司"
					},
					// 可以添加更多的系统配置问题数据对象
				],
				permissionIssues: [{
						"title": "金蝶软件如何设置用户权限？",
						"answerer": "王菲",
						"questionTime": "2024-09-20 09:30",
						"messageCount": 3,
						"name": "王小红",
						"department": "管理员部",
						"companyName": "北京市辉煌电子有限公司"
					},
					{
						"title": "金蝶系统中如何处理权限不足的问题？",
						"answerer": "周杰伦",
						"questionTime": "2024-10-15 14:10",
						"messageCount": 5,
						"name": "赵小强",
						"department": "运维部",
						"companyName": "杭州市创新科技有限公司"
					},
					// 可以添加更多的权限问题数据对象
				]
			};
		},
		methods: {
			handleClick() {
				uni.navigateTo({
					url: '/pages/QuestionDetails/QuestionDetails'
				});
				// uni.showToast({
				//   title: '按钮被点击了！',
				//   icon: 'success'
				// });
			},
		},
		onLoad() {},
		onReady() {},
		onShow() {},
		onHide() {},
		onUnload() {},
		onPullDownRefresh() {},
		onReachBottom() {},
		onShareAppMessage() {}
	};
</script>

<style>
	.page {
		height: 100vh;
		background-color: #F6F6F6;
	}

	.image-container {
		width: 100%;
		height: 320rpx;
		overflow: hidden;
	}

	.uimages {
		width: 100%;
		height: 320rpx;
	}









	.tabs {
		display: flex;
		justify-content: space-around;
		background-color: #ffffff;
		/* padding: 10px 0; */
		position: relative;
	}
</style>